package 华为.text04_字符串分隔;

public class substringText {
    public static void main(String[] args) {
        // 索引从0开始, 左闭右开.
        String s = new String("dafagjjafid");

        String substring = s.substring(0, s.length());
        System.out.println(substring);

        int length = s.length();
        System.out.println("共有"+length+"个字符");
        int part = length/8;
        System.out.println("可以被8分为"+(part+1)+"段:");
    }
}
